﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessTier.Facade.Interface;
using BusinessTier.DataContext;

namespace BusinessTier.Facade.Implementation
{
    public class MembershipService : IMembershipService
    {

        #region IMembershipService Members

        public Guid GetAnonymousUserId(string userName)
        {
            using (var ctx = new SimplyData())
            {
                return ctx.AspNetUsers.Single(m => m.UserName.Equals(userName) && m.IsAnonymous).UserId;
            }
        }

        #endregion
    }
}
